package com.ssm.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/num")
public class Numcontroller {
    @RequestMapping("/jump")
    @ResponseBody
	public ModelAndView jump(){
    	ModelAndView modeandview=new ModelAndView();
    	modeandview.setViewName("WEB-INF/jsp/sum");
    	return modeandview;
	}
    @RequestMapping("/zh")
    @ResponseBody
    public String zh(Integer a){
    	System.out.println(a);
    	String sum="";
    	while(a!=0){
    		sum=a%2+sum;
    		a=a/2;
    	}
    	System.out.println(sum);
    	return sum;
    }
}
